<div id="titulo-head"><p>${playList2[session.countPlayer].titulo}</p></div>
<div id="videoc">
	<script type="text/javascript" src="swfobject.js"></script>    
	  <div id="ytapiplayer">
	    You need Flash player 8+ and JavaScript enabled to view this video.
	  </div>
</div>
<div id="videoinfo">
<h1 style="position:absolute;margin-left:10px;width:250px;height:100px">Musica: ${playList2[session.countPlayer].titulo}</h1>
<img style="margin-top:115px;margin-left:10px;float=left; border:3px solid gray;"id="fotoMusica0" width="100px" height="70px" class="fotoMusica" 	src="http://i2.ytimg.com/vi/${playList2[session.countPlayer].url}/default.jpg" />
</div>
<script type="text/javascript">

    var params = { allowScriptAccess: "always" };
    var atts = { id: "myytplayer" };
    swfobject.embedSWF("http://www.youtube.com/v/${playList2[session.countPlayer].url}?enablejsapi=1&playerapiid=ytplayer", 
               "ytapiplayer", "509", "363", "8", null, null, params, atts);
		
	function onYouTubePlayerReady(myytplayer) {
      	ytplayer = document.getElementById("myytplayer");
		ytplayer.playVideo(1);
		setInterval(function(){cond(ytplayer.getCurrentTime(),ytplayer.getDuration())},100);
    }
	function cond(atual,total){
		if(atual+1>=total){
			document.getElementById("btnatualizar").click();
			db();
		}
	}
	function db(){
		document.getElementById("btnatualizar").disabled = true;
		setTimeout("ab()",4000);
	}
	function ab(){
		document.getElementById("btnatualizar").disabled = false;
	}
</script>